
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<?php
	include "../../inc/data/conn.php";
	$str=$_GET['q'];
	$taskTerm=substr($str, 0,6);
	$stuClass=substr($str, 6);
	?>

	 <?php
	 	$sqlTa="select taskterm,mamx_stu.stuid,stuname,coname,cocode,cotype,coexam,scoverall,scmakeup,scagain
	 			from mamx_stu,mamx_course,mamx_score,mamx_task
	 			where mamx_score.stuid=mamx_stu.stuid
	 			and mamx_score.taskid=mamx_task.taskid
	 			and mamx_task.coid=mamx_course.coid
	 			and mamx_stu.classname=?
	 			and taskterm=?";
	 	$stmtTa=$conn->prepare($sqlTa);
	 		// 绑定参数
	 	$stmtTa->bind_param("si",$stuClass,$taskTerm);
	 	$stmtTa->execute();
	 	$stmtTa->bind_result($taskterm,$stuid,$stuname,$cName,$ccode,$ctype,$cexam,$scoverall,$scmakeup,$scagain);
	 	$stmtTa->store_result();
	 	
	 ?>

	<!-- 信息区域 -->
	<div border="1" style="text-align: center;border-top: 0px">
		<table id="tableIndex">
			<tr style="text-align: center;">
				<td>学年学期</td>
				<td>学号</td>
				<td>姓名</td>
				<td>课程名称</td>
				<td>课程代码</td>
				<td>课程类型</td>
				<td>考核方式</td>
				<td>总评成绩</td>
				<td>补考成绩</td>
				<td>重修成绩</td>
			</tr>
			<?php
			while ($stmtTa -> fetch()) {
				echo <<<END
					<tr style="text-align: center;">
						<td>$taskterm</td>
						<td>$stuid</td>
						<td>$stuname</td>
						<td>$cName</td>
						<td>$ccode</td>
						<td>$ctype</td>
						<td>$cexam</td>
						<td>$scoverall</td>
						<td>$scmakeup</td>
						<td>$scagain</td>
					</tr>
END;
			}
			?>
		</table>
	</div>
</body>
</html>